#ifndef GROUP_FACTORY_COMMAND_IN_H_
#define GROUP_FACTORY_COMMAND_IN_H_
#include "command.h"
#include "ctType.h"

#pragma pack(1)
namespace Cmd {
        namespace GroupFactory {
                enum {
                        CMDIN_LOGIN             = 0x0010,	// 登录GFServer验证指令
                        CMDIN_FORWARD           = 0x0011,	// 转发的指令
                        CMDIN_SESSION           = 0x0012,	// 与SessionServer交互的指令
                        CMDIN_GROUP             = 0x0013,       // 与GroupcussServer交互的指令
                };
                enum { //CMDIN_LOGIN
                        SCMDIN_LOGIN_REQ                        = 0x0001,	// 请求登录请求
                        SCMDIN_LOGIN_RES                        = 0x0002,	// 登录验证返回
                };
                enum { //CMDIN_FORWARD
                        SCMDIN_FORWARD_GF                       = 0x0001,       // 转发到GFServer的指令
                        SCMDIN_FORWARD_USER                     = 0x0002,	// GFServer转发指令给用户
                };
                enum { //CMDIN_SESSION
                        SCMDIN_SESSION_G_LOCATION_REQ           = 0x0001,
                        SCMDIN_SESSION_G_LOCATION_RES           = 0x0002,
                        SCMDIN_SESSION_G_LOCATION_NOTIFY_ADD    = 0x0003,
                        SCMDIN_SESSION_G_LOCATION_NOTIFY_DEL    = 0x0004,
                        SCMDIN_SESSION_USER_GROUP_LIST_REQ      = 0x0005,
                        SCMDIN_SESSION_USER_GROUP_LIST_RES      = 0x0006,
                        SCMDIN_SESSION_WEB_CREATE_NOTIFY_OWNER  = 0x0007,
                };
                enum { //CMDIN_GROUP
                        SCMDIN_GROUP_LIST_REQ                   = 0x0001,
                        SCMDIN_GROUP_LIST_RES                   = 0x0002,
                        SCMDIN_GROUP_ACTIVE_NOTIFY              = 0x0003,
                        SCMDIN_GROUP_MEMBER_UNREAD_MSG_NUM_NOTIFY       = 0x0004,
                        SCMDIN_GROUP_LOAD_REQ                   = 0x0005,
                        SCMDIN_GROUP_LOAD_RES                   = 0x0006,
                        SCMDIN_GROUP_COMMENT_REQ                = 0x0007,
                        SCMDIN_GROUP_COMMENT_RES                = 0x0008,
                        SCMDIN_GROUP_MEMBER_LIST_REQ            = 0x0009,
                        SCMDIN_GROUP_MEMBER_LIST_RES            = 0x000A,
                        SCMDIN_GROUP_ADD_MEMBER_REQ             = 0x000B,
                        SCMDIN_GROUP_ADD_MEMBER_RES             = 0x000C,
                        SCMDIN_GROUP_INVITATION_ADD             = 0x000D,
                        SCMDIN_GROUP_INVITATION_DEL             = 0x000E,
                        SCMDIN_GROUP_INVITATION_LIST_REQ        = 0x000F,
                        SCMDIN_GROUP_INVITATION_LIST_RES        = 0x0010,
                        SCMDIN_GROUP_JOIN_REQ_ADD               = 0x0011,
                        SCMDIN_GROUP_JOIN_REQ_DEL               = 0x0012,
                        SCMDIN_GROUP_JOIN_REQ_LIST_REQ          = 0x0013,
                        SCMDIN_GROUP_JOIN_REQ_LIST_RES          = 0x0014,
                        SCMDIN_GROUP_USER_CARD_SET_REQ          = 0x0015,
                        SCMDIN_GROUP_USER_CARD_SET_RES          = 0x0016,
                        SCMDIN_GROUP_SET_NAME_REQ               = 0x0017,
                        SCMDIN_GROUP_SET_NAME_RES               = 0x0018,
                        SCMDIN_GROUP_SET_INTRO_REQ              = 0x0019,
                        SCMDIN_GROUP_SET_INTRO_RES              = 0x001A,
                        SCMDIN_GROUP_SET_TAGS_REQ               = 0x001B,
                        SCMDIN_GROUP_SET_TAGS_RES               = 0x001C,
                        SCMDIN_GROUP_SET_COMMENT_REQ            = 0x001D,
                        SCMDIN_GROUP_SET_COMMENT_RES            = 0x001E,
                        SCMDIN_GROUP_SET_AVATAR_REQ             = 0x001F,
                        SCMDIN_GROUP_SET_AVATAR_RES             = 0x0020,
                        SCMDIN_GROUP_DEL_USER_REQ               = 0x0021,
                        SCMDIN_GROUP_DEL_USER_RES               = 0x0022,
                        SCMDIN_GROUP_SET_USER_IDENTITY_REQ      = 0x0023,
                        SCMDIN_GROUP_SET_USER_IDENTITY_RES      = 0x0024,
                        SCMDIN_GROUP_DISSOLVE_REQ               = 0x0025,
                        SCMDIN_GROUP_DISSOLVE_RES               = 0x0026,
                        SCMDIN_GROUP_WEB_DELETE_NOTIFY          = 0x0027,
                        SCMDIN_GROUP_WEB_MODIFY_NOTIFY          = 0x0028,
                        SCMDIN_GROUP_WEB_INVITE_NOTIFY          = 0x0029,
                        SCMDIN_GROUP_JOIN_REQ_ADD_IGNORE        = 0x002A,
                        SCMDIN_GROUP_JOIN_REQ_IGNORE_LIST       = 0x002B,
                        SCMDIN_GROUP_INVITATION_FULL_INFO_REQ   = 0x002C,
                        SCMDIN_GROUP_INVITATION_FULL_INFO_RES   = 0x002D,
                };

                struct stLoginCmdReq:
                        t_NullCmd
                {
                        stLoginCmdReq():
                                t_NullCmd(CMDIN_LOGIN, SCMDIN_LOGIN_REQ)
                        {
                                dest_type_ = GROUPFACTORYSERVER;
                                server_type_ = 0;
                                server_id_ = 0;
                        }
                        WORD dest_type_;
                        WORD server_type_;
                        DWORD server_id_;
                };
                struct stLoginCmdRes:
                        t_NullCmd
                {
                        stLoginCmdRes():
                                t_NullCmd(CMDIN_LOGIN, SCMDIN_LOGIN_RES)
                        {
                        }
                };

                struct stForwardGF:
                        t_NullCmd
                {
                        stForwardGF():
                                t_NullCmd(CMDIN_FORWARD, SCMDIN_FORWARD_GF)
                        {
                                user_id_ = 0;
                                size_ = 0;
                        }
                        DWORD user_id_;
                        WORD size_;
                        BYTE data_[0];
                        DWORD getSize() 
                        {
                                return sizeof(*this)+size_*sizeof(data_[0]);
                        }
                };
                struct stForwardUser:
                        t_NullCmd
                {
                        stForwardUser():
                                t_NullCmd(CMDIN_FORWARD, SCMDIN_FORWARD_USER)
                        {
                                user_id_ = 0;
                                size_ = 0;
                        }
                        DWORD user_id_;
                        WORD size_;
                        BYTE data_[0];
                        DWORD getSize() 
                        {
                                return sizeof(*this)+size_*sizeof(data_[0]);
                        }
                };

                struct stSessionGroupLocationReq:
                        t_NullCmd
                {
                        stSessionGroupLocationReq():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_G_LOCATION_REQ)
                        {
                                group_id_ = 0;
                                user_id_ = 0;
                                cmd_type_= 0;
                                cmd_len_ = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        BYTE cmd_type_; //0-user Cmd; 1-server inner cmd
                        WORD cmd_len_;
                        BYTE cmd_data_[0];
                        DWORD getSize()
                        {
                                return sizeof(*this) + cmd_len_*sizeof(cmd_data_[0]);
                        }
                };
                struct stSessionGroupLocationRes:
                        t_NullCmd
                {
                        stSessionGroupLocationRes():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_G_LOCATION_RES)
                        {
                                group_id_ = 0;
                                user_id_ = 0;
                                server_id_ = 0;
                                cmd_type_ = 0;
                                cmd_len_ = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        WORD server_id_;
                        BYTE cmd_type_; //0-user cmd; 1-server inner cmd
                        WORD cmd_len_;
                        BYTE cmd_data_[0];
                        DWORD getSize()
                        {
                                return sizeof(*this) + cmd_len_*sizeof(cmd_data_[0]);
                        }
                };
                struct stSessionGroupLocationSyncRes:
                        t_NullCmd
                {
                        stSessionGroupLocationSyncRes():
                                t_NullCmd()
                        {
                                num_ = 0;
                        }
                        WORD num_;
                        struct stLocationInfo {
                                DWORD groupid;
                                WORD serverid;
                        } list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+num_*sizeof(list_[0]);
                        }
                };
                struct stSessionGroupLocationNotifyAdd:
                        t_NullCmd
                {
                        stSessionGroupLocationNotifyAdd():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_G_LOCATION_NOTIFY_ADD)
                        {
                                group_id_ = 0;
                                server_id_ = 0;
                        }
                        DWORD group_id_;
                        DWORD server_id_;
                };
                struct stSessionGroupLocationNotifyDel:
                        t_NullCmd
                {
                        stSessionGroupLocationNotifyDel():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_G_LOCATION_NOTIFY_DEL)
                        {
                                group_id_ = 0;
                        }
                        DWORD group_id_;
                };
                struct stSessionUserGroupListReq:
                        t_NullCmd
                {
                        stSessionUserGroupListReq():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_USER_GROUP_LIST_REQ)
                        {
                                user_id_ = 0;
                        }
                        DWORD user_id_;
                };
                struct stSessionUserGroupListRes:
                        t_NullCmd
                {
                        stSessionUserGroupListRes():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_USER_GROUP_LIST_RES)
                        {
                                user_id_ = 0;
                                num_ =0 ;
                        }
                        DWORD user_id_;
                        WORD num_;
                        DWORD group_list_[0];
                        DWORD getSize() {
                                return sizeof(*this) + num_*sizeof(group_list_[0]);
                        }
                };
                struct stSessionWebCreateNotifyOwner:
                        t_NullCmd
                {
                        stSessionWebCreateNotifyOwner():
                                t_NullCmd(CMDIN_SESSION, SCMDIN_SESSION_WEB_CREATE_NOTIFY_OWNER)
                        {
                                user_id_        = 0;
                                group_id_       = 0;
                        }
                        DWORD user_id_;
                        DWORD group_id_;
                };

                struct stGroupListReq:
                        t_NullCmd
                {
                        stGroupListReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_LIST_REQ)
                        {
                        }
                };
                struct stGroupListRes:
                        t_NullCmd
                {
                        stGroupListRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_LIST_RES)
                        {
                                num_ = 0;
                        }
                        WORD num_;
                        DWORD list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+num_*sizeof(list_[0]);
                        }
                };
                struct stGroupActiveNotify:
                        t_NullCmd
                {
                        stGroupActiveNotify():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_ACTIVE_NOTIFY)
                        {
                                group_id_ = 0;
                                active_time_ = 0;
                                chat_time_ = 0;
                        }
                        DWORD group_id_;
                        DWORD active_time_;
                        DWORD chat_time_;
                };
                struct stGroupMemberUnreadMsgNumNotify:
                        t_NullCmd
                {
                        stGroupMemberUnreadMsgNumNotify():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_MEMBER_UNREAD_MSG_NUM_NOTIFY)
                        {
                                group_id_ = 0;
                                user_id_ = 0;
                                msg_num_ = 0;
                                msg_no_  = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        DWORD msg_num_;
                        DWORD msg_no_;
                };
                struct stGroupLoadReq:
                        t_NullCmd
                {
                        stGroupLoadReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_LOAD_REQ)
                        {
                                group_id_ = 0;
                                group_type_ = eGroupType_normal;
                                owner_id_ = 0;
                                user_limit_ = GROUP_MEMBER_DEFAULT_LIMIT ;
                                create_time_ = 0;
                                active_time_ = 0;
                                last_chat_time_ = 0;
                                bzero(group_name_, sizeof(group_name_));
                                bzero(group_intro_, sizeof(group_intro_));
                                bzero(group_tags_, sizeof(group_tags_));
                                create_type_ = 0;
                                msg_id_ = 0;
                        }
                        DWORD group_id_;
                        WORD  group_type_;
                        DWORD user_limit_;
                        DWORD owner_id_;
                        DWORD create_time_;
                        DWORD active_time_;
                        DWORD last_chat_time_;
                        char group_name_[MAX_NAME_SIZE+1];
                        char group_intro_[MAX_GROUP_INTRO_SIZE+1];
                        char group_tags_[MAX_GROUP_TAGS_SIZE+1];
                        BYTE create_type_;      //0-自己创建 1-后台创建
                        DWORD msg_id_;
                };
                struct stGroupLoadRes:
                        t_NullCmd
                {
                        stGroupLoadRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_LOAD_RES)
                        {
                                group_id_ = 0;
                                ret_code_ = 0;
                        }
                        DWORD group_id_;
                        BYTE ret_code_; //0-fail 1-success
                };
                struct stGroupCommentReq:
                        t_NullCmd
                {
                        stGroupCommentReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_COMMENT_REQ)
                        {
                                group_id_ = 0;
                        }
                        DWORD group_id_;
                };
                struct stGroupCommentRes:
                        t_NullCmd
                {
                        stGroupCommentRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_COMMENT_RES)
                        {
                                group_id_ = 0;
                                comment_len_ = 0;
                        }
                        DWORD group_id_;
                        WORD comment_len_;
                        char comment_[0];
                        DWORD getSize() {
                                return sizeof(*this) + comment_len_*sizeof(comment_[0]);
                        }
                };
                struct stGroupMemberListReq:
                        t_NullCmd
                {
                        stGroupMemberListReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_MEMBER_LIST_REQ)
                        {
                                group_id_ = 0;
                        }
                        DWORD group_id_;
                };
                struct stGroupMemberListRes:
                        t_NullCmd
                {
                        stGroupMemberListRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_MEMBER_LIST_RES)
                        {
                                group_id_ = 0;
                                user_num_ = 0;
                        }
                        DWORD group_id_;
                        WORD  user_num_;
                        struct {
                                DWORD user_id_;
                                WORD  identity_;
                                WORD  unread_msg_;
                                char  group_card_[MAX_NAME_SIZE+1];
                                char  account_[MAX_ACCOUNT_SIZE+1];
                                char  nickname_[MAX_NAME_SIZE+1];
                                DWORD msg_no_;
                        } user_list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+user_num_*sizeof(user_list_[0]);
                        }
                };
                struct stGroupAddMemberReq:
                        t_NullCmd
                {
                        stGroupAddMemberReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_ADD_MEMBER_REQ)
                        {
                                group_id_       = 0;
                                user_id_        = 0;
                                type_           = 0;           
                                operator_       = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        BYTE  type_;    //0-request join 1-invite join
                        DWORD operator_;//manager
                };
                struct stGroupAddMemberRes:
                        t_NullCmd
                {
                        stGroupAddMemberRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_ADD_MEMBER_RES)
                        {
                                group_id_ = 0;
                                user_id_  = 0;
                                bzero(account_, sizeof(account_));
                                bzero(nickname_, sizeof(nickname_));
                                type_           = 0;           
                                operator_       = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        char account_[MAX_ACCOUNT_SIZE+1];
                        char nickname_[MAX_NAME_SIZE+1];
                        BYTE  type_;    //0-request join 1-invite join
                        DWORD operator_;//manager
                };
                struct stGroupInvitationAdd:
                        t_NullCmd
                {
                        stGroupInvitationAdd():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_ADD)
                        {
                                group_id_ = 0;
                                user_id_ = 0;
                                invitor_id_ = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        DWORD invitor_id_;
                };
                struct stGroupInvitationDel:
                        t_NullCmd
                {
                        stGroupInvitationDel():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_DEL)
                        {
                                group_id_       = 0;
                                user_id_        = 0;
                                invitor_id_     = 0;
                                delete_all_     = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        DWORD invitor_id_;
                        BYTE  delete_all_;      //0-no, 1-yes
                };
                struct stGroupInvitationListReq:
                        t_NullCmd
                {
                        stGroupInvitationListReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_LIST_REQ)
                        {
                                group_id_ = 0;
                        }
                        DWORD group_id_;
                };
                struct stGroupInvitationListRes:
                        t_NullCmd
                {
                        stGroupInvitationListRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_LIST_RES)
                        {
                                group_id_ = 0;
                                num_ = 0;
                        }
                        DWORD group_id_;
                        WORD num_;
                        struct {
                                DWORD user_id_;
                                DWORD invitor_id_;
                                DWORD time_;
                        }list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+num_*sizeof(list_[0]);
                        }
                };
                /*
                 *
                 SCMDIN_GROUP_JOIN_REQ_ADD,
                 SCMDIN_GROUP_JOIN_REQ_DEL,
                 SCMDIN_GROUP_JOIN_REQ_LIST_REQ,
                 SCMDIN_GROUP_JOIN_REQ_LIST_RES,
                 */
                struct stGroupJoinReqAdd:
                        t_NullCmd
                {
                        stGroupJoinReqAdd():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_ADD)
                        {
                                group_id_ = 0;
                                user_id_  = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                };
                struct stGroupJoinReqDel:
                        t_NullCmd
                {
                        stGroupJoinReqDel():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_DEL)
                        {
                                group_id_ = 0;
                                user_id_  = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                };
                struct stGroupJoinReqListReq:
                        t_NullCmd
                {
                        stGroupJoinReqListReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_LIST_REQ)
                        {
                                group_id_ = 0;
                        }
                        DWORD group_id_;
                };
                struct stGroupJoinReqListRes:
                        t_NullCmd
                {
                        stGroupJoinReqListRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_LIST_RES)
                        {
                                group_id_ = 0;
                                req_num_  = 0;
                        }
                        DWORD group_id_;
                        WORD  req_num_;
                        struct {
                                DWORD user_id_;
                                DWORD time_;
                                char account_[MAX_ACCOUNT_SIZE+1];
                                char nick_name_[MAX_NAME_SIZE+1];
                                char auth_info_[MAX_GROUP_AUTH_INFO_SIZE+1];
                        } req_list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+req_num_*sizeof(req_list_[0]);
                        }
                };
                struct stGroupUserCardSetReq:
                        t_NullCmd
                {
                        stGroupUserCardSetReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_USER_CARD_SET_REQ)
                        {
                                group_id_ = 0;
                                user_id_  = 0;
                                bzero(card_, sizeof(card_));
                                gender_   = eSexType_female;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        char card_[MAX_NAME_SIZE+1];
                        BYTE gender_;
                };
                struct stGroupUserCardSetRes:
                        t_NullCmd
                {
                        stGroupUserCardSetRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_USER_CARD_SET_RES)
                        {
                                group_id_ = 0;
                                user_id_  = 0;
                                ret_code_ = 0;
                                bzero(card_, sizeof(card_));
                                gender_   = eSexType_female;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                        BYTE ret_code_; //0-fail, 1-success
                        char card_[MAX_NAME_SIZE+1];
                        BYTE gender_;
                };
                struct stGroupSetNameReq:
                        t_NullCmd
                {
                        stGroupSetNameReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_NAME_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(name_, sizeof(name_));
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char name_[MAX_NAME_SIZE+1];
                };
                struct stGroupSetNameRes:
                        t_NullCmd
                {
                        stGroupSetNameRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_NAME_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(name_, sizeof(name_));
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char name_[MAX_NAME_SIZE+1];
                        BYTE  ret_code_; //0-fail 1-success
                };
                struct stGroupSetIntroReq:
                        t_NullCmd
                {
                        stGroupSetIntroReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_INTRO_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(intro_, sizeof(intro_));
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  intro_[MAX_GROUP_INTRO_SIZE+1];
                };
                struct stGroupSetIntroRes:
                        t_NullCmd
                {
                        stGroupSetIntroRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_INTRO_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(intro_, sizeof(intro_));
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  intro_[MAX_GROUP_INTRO_SIZE+1];
                        BYTE  ret_code_; //0-fail 1-success
                };
                struct stGroupSetTagsReq:
                        t_NullCmd
                {
                        stGroupSetTagsReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_TAGS_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(tags_, sizeof(tags_));
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  tags_[MAX_GROUP_TAGS_SIZE+1];
                };
                struct stGroupSetTagsRes:
                        t_NullCmd
                {
                        stGroupSetTagsRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_TAGS_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(tags_, sizeof(tags_));
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  tags_[MAX_GROUP_TAGS_SIZE+1];
                        BYTE  ret_code_;
                };
                struct stGroupSetCommentReq:
                        t_NullCmd
                {
                        stGroupSetCommentReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_COMMENT_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                comment_len_    = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        WORD  comment_len_;
                        char  comment_data_[0];
                        DWORD getSize() {
                                return sizeof(*this)+comment_len_*sizeof(comment_data_[0]);
                        }
                };
                struct stGroupSetCommentRes:
                        t_NullCmd
                {
                        stGroupSetCommentRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_COMMENT_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                ret_code_       = 0;
                                comment_len_    = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        BYTE  ret_code_;
                        WORD  comment_len_;
                        char  comment_data_[0];
                        DWORD getSize() {
                                return sizeof(*this)+comment_len_*sizeof(comment_data_[0]);
                        }
                };
                struct stGroupSetAvatarReq:
                        t_NullCmd
                {
                        stGroupSetAvatarReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_AVATAR_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(avatar_, sizeof(avatar_));
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  avatar_[MAX_AVATAR_SIZE+1];
                };
                struct stGroupSetAvatarRes:
                        t_NullCmd
                {
                        stGroupSetAvatarRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_AVATAR_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                bzero(avatar_, sizeof(avatar_));
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        char  avatar_[MAX_AVATAR_SIZE+1];
                        BYTE  ret_code_;        //0-fail 1-success
                };
                struct stGroupDelUserReq:
                        t_NullCmd
                {
                        stGroupDelUserReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_DEL_USER_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                user_id_        = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        DWORD user_id_;
                };
                struct stGroupDelUserRes:
                        t_NullCmd
                {
                        stGroupDelUserRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_DEL_USER_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                user_id_        = 0;
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        DWORD user_id_;
                        BYTE  ret_code_;        //0-fail 1-success
                };
                struct stGroupSetUserIdentityReq:
                        t_NullCmd
                {
                        stGroupSetUserIdentityReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_USER_IDENTITY_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                user_id_        = 0;
                                identity_       = eGroupType_normal;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        DWORD user_id_;
                        BYTE  identity_;
                };
                struct stGroupSetUserIdentityRes:
                        t_NullCmd
                {
                        stGroupSetUserIdentityRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_SET_USER_IDENTITY_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                user_id_        = 0;
                                identity_       = eGroupType_normal;
                                ret_code_       = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        DWORD user_id_;
                        BYTE  identity_;
                        BYTE  ret_code_; //0-fail 1-success
                };
                struct stGroupDissolveReq:
                        t_NullCmd
                {
                        stGroupDissolveReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_DISSOLVE_REQ)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                };
                struct stGroupDissolveRes:
                        t_NullCmd
                {
                        stGroupDissolveRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_DISSOLVE_RES)
                        {
                                group_id_       = 0;
                                operator_id_    = 0;
                                result_         = 0;
                        }
                        DWORD group_id_;
                        DWORD operator_id_;
                        BYTE  result_; //0-fail 1-success
                };
                struct stGroupWebDeleteNotify:
                        t_NullCmd
                {
                        stGroupWebDeleteNotify():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_WEB_DELETE_NOTIFY)
                        {
                                group_id_       = 0;
                        }
                        DWORD group_id_;
                };
                struct stGroupWebModifyNotify:
                        t_NullCmd
                {
                        stGroupWebModifyNotify():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_WEB_MODIFY_NOTIFY)
                        {
                                group_id_       = 0;
                                owner_          = 0;
                                user_limit_     = 0;
                                bzero(name_, sizeof(name_));
                                bzero(intro_, sizeof(intro_));
                                bzero(tags_, sizeof(tags_));
                                type_           = eGroupType_normal;
                        }
                        DWORD group_id_;
                        DWORD owner_;
                        WORD  user_limit_;
                        char  name_[MAX_NAME_SIZE+1];
                        char  intro_[MAX_GROUP_INTRO_SIZE+1];
                        char  tags_[MAX_GROUP_TAGS_SIZE+1];
                        uint16_t type_;
                };
                struct stGroupWebInviteNotify:
                        t_NullCmd
                {
                        stGroupWebInviteNotify():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_WEB_INVITE_NOTIFY)
                        {
                                group_id_       = 0;
                                user_id_        = 0;
                        }
                        DWORD group_id_;
                        DWORD user_id_;
                };
                struct stGroupJoinReqAddIgnore:
                        t_NullCmd
                {
                        stGroupJoinReqAddIgnore():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_ADD_IGNORE)
                        {
                                group_id_       = 0;
                                manager_id_     = 0;
                                user_id_        = 0;
                        }
                        DWORD group_id_;
                        DWORD manager_id_;
                        DWORD user_id_;
                };
                struct stGroupJoinReqIgnoreList:
                        t_NullCmd
                {
                        stGroupJoinReqIgnoreList():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_JOIN_REQ_IGNORE_LIST)
                        {
                                group_id_       = 0;
                                num_            = 0;
                        }
                        DWORD group_id_;
                        WORD  num_;
                        struct {
                                DWORD manager_id_;;
                                DWORD user_id_;
                        } list_[0];
                        DWORD getSize() {
                                return sizeof(*this)+num_*sizeof(list_[0]);
                        }
                };
                struct stGroupInvitationFullInfoReq:
                        t_NullCmd
                {
                        stGroupInvitationFullInfoReq():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_FULL_INFO_REQ)
                        {
                                group_id_ = 0;
                                requester_id_ = 0;
                        }
                        DWORD group_id_;
                        DWORD requester_id_;
                };
                struct stGroupInvitationFullInfoRes:
                        t_NullCmd
                {
                        stGroupInvitationFullInfoRes():
                                t_NullCmd(CMDIN_GROUP, SCMDIN_GROUP_INVITATION_FULL_INFO_RES)
                        {
                                group_id_ = 0;
                                requester_id_ = 0;
                                num_ = 0;
                        }

                        DWORD getSize() const
                        {
                                return sizeof(*this) + num_*sizeof(list_[0]);
                        }

                        DWORD group_id_;
                        DWORD requester_id_;
                        WORD num_;
                        struct {
                                DWORD user_id_;
                                char user_account_[MAX_ACCOUNT_SIZE+1];
                                char user_nickname_[MAX_NAME_SIZE+1];
                        } list_[0];
                };
        }; //GroupFactory
}; //Cmd

#pragma pack()
#endif //GROUP_FACTORY_COMMAND_IN_H_
